package com.example.myproject.util;

import com.qiaofang.common.mq.rabbitmq.bean.MqSendData;
import com.qiaofang.queue.bean.SendCommunicationData;
import sun.misc.BASE64Decoder;

import java.io.ByteArrayInputStream;
import java.io.ObjectInputStream;

/**
 * Created by Administrator on 2018/3/15.
 */
public class SerialUtilSendCommunicationData {
    public static void main(String args[]){

        String str ="rO0ABXNyAC1jb20ucWlhb2ZhbmcucXVldWUuYmVhbi5TZW5kQ29tbXVuaWNhdGlvbkRhdGEsAS0U+4QCHgIABloADHVzZVRlc3RRdWV1ZUwADGJ1c2luZXNz\n" +
                "RGF0YXQAEkxqYXZhL2xhbmcvT2JqZWN0O0wAC2NvbXBhbnlVdWlkdAASTGphdmEvbGFuZy9TdHJpbmc7TAAJZXZlbnRUeXBlcQB+AAJMAAZ1c2VySWR0ABBM\n" +
                "amF2YS9sYW5nL0xvbmc7TAAIdXNlclV1aWRxAH4AAnhwAHNyACljb20ucWlhb2ZhbmcucXVldWUuYmVhbi5Db21wYW55U3luY2hyb0RUT2AJ1YU1v0CHAgAf\n" +
                "TAAIY2FyZERlc2NxAH4AAkwACWNhcmRQaG9uZXEAfgACTAANY2hyb21lVmVyc2lvbnEAfgACTAAOY29tcGFueUFjY291bnRxAH4AAkwAC2NvbXBhbnlDaXR5\n" +
                "cQB+AAJMAAtjb21wYW55TmFtZXEAfgACTAALY29tcGFueVV1aWRxAH4AAkwABmRiTmFtZXEAfgACTAAKZGJQYXNzd29yZHEAfgACTAAKZGJTZXJ2ZXJJZHEA\n" +
                "fgADTAAFZGJVcmxxAH4AAkwACmRiVXNlcm5hbWVxAH4AAkwACGRlc2NyaWJlcQB+AAJMAA1lbmNyeXB0U3dpdGNodAATTGphdmEvbGFuZy9Cb29sZWFuO0wA\n" +
                "DGZ5RGJQYXNzd29yZHEAfgACTAAHZnlEYlVybHEAfgACTAAMZnlEYlVzZXJOYW1lcQB+AAJMAAJoZHEAfgACTAAXbGFzdFN5bmNUcmFuc2FjdGlvblRpbWV0\n" +
                "ABBMamF2YS91dGlsL0RhdGU7TAALbG9naW5NZXRob2RxAH4AAkwABGxvZ29xAH4AAkwADG1pY3JvU2hvcFVybHEAfgACTAAMbWlncmF0ZWREYXRhcQB+AAJM\n" +
                "AAVwaG9uZXEAfgACTAALcWlOaXVTd2l0Y2hxAH4ABkwAAnFscQB+AAJMAAZ0aWNrZXRxAH4AAkwAEXRyYWRlQ2VudGVyQXBpVXJscQB+AAJMAAl2MTBBcGlV\n" +
                "cmxxAH4AAkwAB3ZlcnNpb25xAH4AAkwABHpvbmVxAH4AAnhwcHBwcHQABuS4iua1t3QABnFmMDEwMXQAF3FmMDEwMV9jb21wYW55NDg3NTk4NGEydAAGcWYw\n" +
                "MTAxcHB0AEVqZGJjOmp0ZHM6c3Fsc2VydmVyOi8vMTkyLjE2OC4xNi4xMjA6MTQzMztEYXRhYmFzZU5hbWU9Znh0X3dlYl9xZjAxMDFwcHB0AA8rXykoKjU0\n" +
                "NDAuMGQ1NjVwdAAOZnh0X3dlYl9xZjAxMDFwcHQAB2VtcE5hbWVwdAAZaHR0cDovL3dtZC56aG9uZ2ppZXl1bi5jbnBwcHBwdAAeaHR0cDovLzE5Mi4xNjgu\n" +
                "MTAuMjIzL0RhdGFBcGkvdAAkaHR0cDovL3pvbmU0LnFpYW9mYW5neXVuLmNvbS9meHRBcGkvdAAFZ18yLjB0AAV6b25lNHQAAHQADk9OTElORV9DT01QQU5Z\n" +
                "c3IADmphdmEubGFuZy5Mb25nO4vkkMyPI98CAAFKAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cP//////////cQB+ABY=";
        BASE64Decoder base64Decoder = new BASE64Decoder();
        SendCommunicationData temp = null;
        try {
            byte[] byteArr = base64Decoder.decodeBuffer(str);
            ObjectInputStream objIn= null;
            objIn = new ObjectInputStream(new ByteArrayInputStream(byteArr,0,byteArr.length));
            temp = (SendCommunicationData) objIn.readObject();
        } catch (Exception e) {
            e.printStackTrace();
        }


    }
}
